﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JXT.PrimaryKey.Batman.Domain.Models
{
    public class ObjectExistsException : Exception
    { 
        public string ObjectName { get; private set; }

        public ObjectExistsException(string objectName)
            : this(objectName, String.Format("object {0} is exists!", objectName), null)
        {
        }

        public ObjectExistsException(string objectName, string message)
            : this(objectName, message, null)
        {
        }

        public ObjectExistsException(string objectName, string message, Exception innerException)
            : base(message, innerException)
        {
            ObjectName = objectName;
        }
    }
}
